package cn.gok;

public class Test1 {
    public static void main(String[] args) {
        Person p1 = new Person("sad","男",22,false);
        Person p2 = new Person("sada","女",20,false);
        Person.marryWith(p1,p2);
        System.out.println(p1.getInMarried());
        System.out.println(p2.getInMarried());

        int time =1;
        Person p3 = new Person("sad","男",22,false){
            @Override
            public void study(String school) {
                System.out.println(getName()+"在"+school+"学习了"+time+"年");
            }
        };
        p3.study("sad");
    }
}
